﻿using Furion.DatabaseAccessor;
using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace JoyAdmin.Core.Entities.System
{
    public class SysArea : SysEntity , IEntitySeedData<SysArea, MultiTenantDbContextLocator>
    {
        /// <summary>
        /// 地区名称
        /// </summary>
        [StringLength(50)]
        public string Name { get; set; }

        /// <summary>
        /// 地区编码
        /// </summary>
        [StringLength(50)]
        public string Code { get; set; }
        public IEnumerable<SysArea> HasData(DbContext dbContext, Type dbContextLocator)
        {
            return new[]
             {
                new SysArea
                {
                   CreatedTime=DateTime.UtcNow, Id=1, Name="临沂市",Code="370100",
                },
                new SysArea
                {
                     CreatedTime=DateTime.UtcNow,Id=2,Name="兰山区",Code="371302"
                },
                new SysArea
                {
                     CreatedTime=DateTime.UtcNow,Id=3,Name="罗庄区",Code="371311"
                },
                new SysArea
                {
                     CreatedTime=DateTime.UtcNow,Id=4,Name="河东区",Code="371312"
                },
                new SysArea
                {
                     CreatedTime=DateTime.UtcNow,Id=5,Name="沂南县",Code="371321"
                },
                new SysArea
                {
                     CreatedTime=DateTime.UtcNow,Id=6,Name="郯城县",Code="371322"
                },
                new SysArea
                {
                   CreatedTime=DateTime.UtcNow,  Id=7,Name="沂水县",Code="371323"
                },
                new SysArea
                {
                    CreatedTime=DateTime.UtcNow, Id=8,Name="兰陵县",Code="371324"
                },
                new SysArea
                {
                    CreatedTime=DateTime.UtcNow, Id=9,Name="费县",Code="371325"
                },
                new SysArea
                {
                    CreatedTime=DateTime.UtcNow, Id=10,Name="平邑县",Code="371326"
                },
                 new SysArea
                {
                    CreatedTime=DateTime.UtcNow, Id=11,Name="莒南县",Code="371327"
                },
                  new SysArea
                {
                    CreatedTime=DateTime.UtcNow, Id=12,Name="蒙阴县",Code="371328"
                },
                   new SysArea
                {
                    CreatedTime=DateTime.UtcNow, Id=13,Name="临沭县",Code="371329"
                },
            };
        }
    }
}
